(import
 (prefix (gi) gi:))

(gi:use-typelibs ("GLib" "2.0"))

;; From the docs: "If a typelib does not provide an explicit
;; constructor for a struct or union, an empty instance can
;; be created by using make."
;; Create a new empty <GDate> using 'make'
(gi:write (gi:make <GDate>))
(newline)

;; Create a new <GDate> using a constructor procedure
(define dt
  (date:new-dmy 1
                (symbol->date-month 'january)
                2000))

;; Modify the contents of <GDate>
(add-years dt 1)

;; Compute the resulting year
(gi:write (get-year dt))
(newline)
